/**
 * @(#) Waiter.java
 */

package TheRestaurantOwner;

public class Waiter extends Employee
{
	private java.util.List<Table> tables;
	
	public Waiter( )
	{
		trainingCost = 800;
		tables = new java.util.ArrayList<Table>();
	}
	
	public int getSalary( ) {
		// If the level of experience is low, the salary per week for a waiter is 200 euros.
		// If the level of experience is medium, the salary for a waiter is 300 euros.
		// If the level of experience is high, the salary for a waiter is 400 euros.
		switch (getExperience()){
		case low:
			return 200;
		case medium:
			return 300;
		case high:
			return 400;
		}
		return 0;
	}

	public void assignTable( Table table )
	{
		tables.add(table);
	}
	
	public void clearAssignments( )
	{
		tables.clear();
	}
	
	public Table[] getAssignments( ){
		Table[] tableArray = new Table[tables.size()];
		return tables.toArray(tableArray);
	}
}
